how to check if a value exists in map golang

188

how to check if a value exists in map golang -

if val, ok := dict["foo"]; ok {
    //do something here
}

Comments

Submit
0 Comments